## ---------------------------------------------------------------------------------------------------
##
## 		Replication file:
##	  "The Political Effects of Opioid Addiction Frames"
##    The following files replicate figures and tables in the paper and appendix
##    Replicated figures and tables will be saved to the folder "[download location path]/Replication/code/output"
##    “opioid_frames_log.txt”  Reports and describes replication output
##    Code files for in-text calculations can be accessed here: "[download location path]/Replication/code/03_Intext_Calculations” 
## ---------------------------------------------------------------------------------------------------

sink(file="opioid_frames_log.txt")

## ---------------------------------------------------------------------------------------------------
# Main Paper
## ---------------------------------------------------------------------------------------------------

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Figure 1 
## ---------------------------------------------------------------------------------------------------
source("./01_Main_Paper/Figure 1.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Figure 2
## ---------------------------------------------------------------------------------------------------
source("./01_Main_Paper/Figure 2.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Figure 3
## ---------------------------------------------------------------------------------------------------
source("./01_Main_Paper/Figure 3.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Figure 4
## ---------------------------------------------------------------------------------------------------
source("./01_Main_Paper/Figure 4.R", print.eval=TRUE)

## ---------------------------------------------------------------------------------------------------
# Appendix
## ---------------------------------------------------------------------------------------------------

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Figure A2-A3
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Figures A2 - A3.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Figure A4
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Figure A4.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Tables A1-2
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Tables A1 - A2.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Figure A5
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Figure A5.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Tables A4-10
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Tables A4 - A10.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Tables A11-20
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Tables A11 - A20.R")


## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Figure A6
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Figure A6.R", print.eval=TRUE)


## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Figure A7
## ---------------------------------------------------------------------------------------------------

source("./02_Appendix/Figure A7.R")

## ---------------------------------------------------------------------------------------------------
## Code to reproduce Appendix Figure A8
## ---------------------------------------------------------------------------------------------------
rm(list=ls())
source("./02_Appendix/Figure A8.R")

sink()
